<?php
$pid = pcntl_fork();
if ($pid>0){
    cli_set_process_title("php father process");
    $wait_result = pcntl_waitpid($pid,$status);
    var_dump($wait_result);
    var_dump($status);
}else if ($pid==0){
    cli_set_process_title("php child process");
    sleep(10);
}else{
    exit('fork error'.PHP_EOL);
}
